package com.atguigu.spzx.product.feign;

import com.atguigu.spzx.product.dto.ProductSkuDetailRespDto;
import com.atguigu.spzx.product.dto.SkuSaleNumUpdateReqDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 * ProductFeignClient
 * </p>
 *
 * @author flyduck
 * @since 2023/11/6
 */
@FeignClient(value = "spzx-product-service")
public interface ProductFeignClient {

    @PostMapping("/api/product//updateSkuSaleNum")
    public void updateSkuSaleNum(@RequestBody List<SkuSaleNumUpdateReqDto> skuSaleNumUpdateReqDtoList);

    @GetMapping("/api/product/getProductSkuBySkuId/{skuId}")
    public ProductSkuDetailRespDto getProductSkuBySkuId(@PathVariable("skuId") Long skuId);
}
